
public class SampleBuilderMilkTea {
    private String type;
    private String size;
    private boolean pearl;
    private boolean ice;

    private SampleBuilderMilkTea() {
    }

    private SampleBuilderMilkTea(String type, String size, boolean pearl, boolean ice) {
        this.type = type;
        this.size = size;
        this.pearl = pearl;
        this.ice = ice;
    }

    private SampleBuilderMilkTea(Builder builder) {
        this.type = builder.type;
        this.size = builder.size;
        this.pearl = builder.pearl;
        this.ice = builder.ice;
    }

    public String getType() {
        return type;
    }

    public String getSize() {
        return size;
    }

    public boolean isPearl() {
        return pearl;
    }

    public boolean isIce() {
        return ice;
    }

    public static class Builder {
        private final String type;
        private String size;
        private boolean pearl;
        private boolean ice;

        public Builder(String type) {
            this.type = type;
        }

        public Builder size(String size) {
            this.size = size;
            return this;
        }

        public Builder pearl(boolean pearl) {
            this.pearl = pearl;
            return this;
        }

        public Builder ice(boolean ice) {
            this.ice = ice;
            return this;
        }

        private SampleBuilderMilkTea build() {
            return new SampleBuilderMilkTea(this);
        }
    }
}
